// 数据拼接
function addHtml(data) {
	var html = '';
	if (data.list.length <= 0) {
		$('.ui_loadmore_text').html('<span>没有更多了</span>');
	} else {
		for (var i = 0; i < data.list.length; i++) {
			/*红包使用返还方式*/
			var rewardUseType = data.list[i].rewardUseType;
			var rewardUseTypeText = '其他';
			if(rewardUseType == 'MULTIPLE100'){
				rewardUseTypeText = '100倍起投';
			} else if(rewardUseType == 'CASH200'){
				rewardUseTypeText = '200元起投';
			} else if(rewardUseType == 'TANDONE'){
				rewardUseTypeText = 'T+1模式返还现金';
			} else if(rewardUseType == 'AFTERLOAN'){
				rewardUseTypeText = '放款划账';
			} else if(rewardUseType == 'LASTPLA'){
				rewardUseTypeText = '最后一次还款时给';
			}
			
			var rewardTypeText = '注册红包';
			var rewardType = data.list[i].rewardType;
			if(rewardType == 'INVITE_ONE_RED'){
				rewardTypeText = '邀请注册一级红包';
			} else if(rewardType == 'INVITE_TWO_RED'){
				rewardTypeText = '邀请注册二级红包';
			} else if(rewardType == 'INVITE_THREE_RED'){
				rewardTypeText = '邀请注册三级红包';
			} else if(rewardType == 'INVEST_RED'){
				rewardTypeText = '投资等额红包';
			} else if(rewardType == 'SHARE_ONE_RED'){
				rewardTypeText = '分享一级红包';
			} else if(rewardType == 'SHARE_TWO_RED'){
				rewardTypeText = '分享二级红包';
			} else if(rewardType == 'SHARE_THREE_RED'){
				rewardTypeText = '分享三级红包';
			} else if(rewardType == 'SHARE_FOUR_RED'){
				rewardTypeText = '分享四级红包';
			} else if(rewardType == 'SHARE_FIVE_RED'){
				rewardTypeText = '分享五级红包';
			} else if(rewardType == 'SHARE_SIX_RED'){
				rewardTypeText = '分享六级红包';
			} else if(rewardType == 'INVEST_ONE_REBATE'){
				rewardTypeText = '投资一级返利';
			} else if(rewardType == 'INVEST_TWO_REBATE'){
				rewardTypeText = '投资二级返利';
			} else if(rewardType == 'INVEST_THREE_REBATE'){
				rewardTypeText = '投资三级返利';
			} else if(rewardType == 'INVEST_FOUR_REBATE'){
				rewardTypeText = '投资四级返利';
			} else if(rewardType == 'EMPLOYEE_INVITE_INVEST_REBATE'){
				rewardTypeText = '员工邀请投资返利';
			} else if(rewardType == 'INVEST_MOVIE'){
				rewardTypeText = '投资送电影票';
			} else if(rewardType == 'POINT'){
				rewardTypeText = '投资送积分';
			} else if(rewardType == 'ADD_ONE_RATE'){
				rewardTypeText = '会员一级加息';
			} else if(rewardType == 'ADD_TWO_RATE'){
				rewardTypeText = '会员二级加息';
			} else if(rewardType == 'ADD_THREE_RATE'){
				rewardTypeText = '会员三级加息';
			} else if(rewardType == 'ADD_FOUR_RATE'){
				rewardTypeText = '会员四级加息';
			} else if(rewardType == 'ADD_FIVE_RATE'){
				rewardTypeText = '会员五级加息';
			}
			
			var statusText = '可用';
			var status = data.list[i].status;
			if(status == 'UNACTIVE'){
				statusText = '未激活';
			} else if(status == 'USEED'){
				statusText = '已用';
			} else if(status == 'OUTDATE'){
				statusText = '已过期';
			} else if(status == 'ABANDON'){
				statusText = '已作废';
			} else if(status == 'SHARED'){
				statusText = '已分享';
			}
			
			var strhtml = '<p class="gray_v1 f15">'+(data.list[i].money - 0) / 100+'元</p><span class="gray_v1">'+statusText+'</span>';
			if (status == 'CANUSE') {
				strhtml = '<p class="red_v1 f15">'+(data.list[i].money - 0) / 100+'元</p>';
			} 

			var endtime = null;
			if (data.list[i].endtime == null) {
				endtime = '';
			} else {
				endtime = new Date(data.list[i].endtime).format("yyyy-MM-dd hh:mm:ss");
			}

			html += '<dl class="ui_con_jl">';
			html += '<dt>';
			html += '<p class="f15">';
			html += '<span class="ui_stutas">'+rewardUseTypeText+'</span>'+rewardTypeText;
			html += '</p>';
			html += '<p class="gray_v1">'+ endtime +'</p>';
			html += '</dt>';
			html += '<dd>';
			html += '<div class="ui_middle">';
			html +=  strhtml;
			html += '</div>';			
			html += '</dd>';			
			html += '</dl>';			
		}
		$('.ui_loadmore_text').html('<a href="javascript:void(0);" class="more">点击加载更多</a>');
	}
	$('#list_more').append(html);
}
